package com.touzbi.hss.bo;

import javax.servlet.http.HttpServletRequest;

import org.hibernate.Session;

import com.touzbi.hss.beans.Patient;
import com.touzbi.hss.dao.AbstractPatientDAO;
import com.touzbi.hss.dao.PatientDAO;

public class PatientBO {

	private static final String ID_PARAM = "id";
	private AbstractPatientDAO patientDAO;

	public PatientBO(Session session) {
		this.patientDAO = new PatientDAO(session);
	}

	public Patient getPatient(HttpServletRequest req) {
		String id = req.getParameter(ID_PARAM);
		return this.patientDAO.getPatientById(Long.valueOf(id));
	}

}
